package com.developerstack.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@EnableWebMvc
public class MvcConfig extends WebMvcConfigurerAdapter {
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		//file:///C:/opt/files/
		registry.addResourceHandler("/files/**").addResourceLocations("file:/home/ubuntu/demo/","file:///C:/temp/");
		//registry.addResourceHandler("/files/**").addResourceLocations("file:///C:/temp/");
	}
}